<%@ include file="/WEB-INF/includes/taglibs.jsp"%>
<html>
	<head>
		<title>Test de jqGrid</title>
		<script>
			$(document).ready(function (){
				$('#list').jqGrid({
					url: '<spring:url value="/app/test/jqgrid/data/example"/>',
					datatype: 'json',
					mtype: 'GET',
					colNames: ["ID", "Nombre", "Apellidos"],
					colModel: [
					    {name: 'id'},
						{name: 'nombre'},
						{name: 'apellidos'}
					],
					pager: '#pager',
					rowNum: 10,
					rowList: [1, 5, 10, 20, 30],
					viewrecords: true,
					gridview: true,
					caption: 'Clientes',
					jsonReader: {
						root: 'datos',
						page: 'pagina',
						total: 'totalpaginas',
						records: 'totalfilas',
						repeatitems: false,
						id: '0'
					} 
				});
			});
		</script>
	</head>
	<body>
		<h1>Test de jqGrid</h1>
		<table id="list">
			<tr>
				<td></td>
			</tr>
		</table>
		<div id="pager"></div>
	</body>
</html>